package com.meirengu.webview.common;

/**
 * 筛选类型枚举类
 */
public enum UserChannelEnum {

    PASS("符合", 1),
    FAIL_AGE("年龄不符合", 2),
    FAIL_AREA("地区不符合", 3),
    FAIL_O2O("非O2O", 4),
    FAIL_FUND("没有公积金", 5),
    FAIL_LOW_AMOUNT("申请额度低", 6),
    FAIL_NO_CREDIT("无信用卡", 7),
    FAIL_SALARY("收入不符合", 8),
    FAIL_MAX_PUSH("不再接收数据", 9);

    // 成员变量
    private String name;
    private int value;

    // 构造方法
    private UserChannelEnum(String name, int value) {
        this.name = name;
        this.value = value;
    }

    // 普通方法
    public static String getName(int value) {
        for (UserChannelEnum c : UserChannelEnum.values()) {
            if (c.getValue() == value) {
                return c.name;
            }
        }
        return null;
    }

    // get set 方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

}
